using HCore.Unity.Manager;
using UnityEngine;
using UnityEngine.UI;

namespace HCore.Tests.Runtime.BlurEffect.Scripts
{
    public class TestView1 : BaseView
    {
        private GameObject mCloseBtnObj;

        protected new void Awake()
        {
            NeedBlurBg = true;
            base.Awake();
        }

        private void Start()
        {
            mCloseBtnObj = transform.Find("close_btn").gameObject;
            mCloseBtnObj.GetComponent<Button>().onClick.AddListener(OnCloseBtnClick);
        }

        private static void OnCloseBtnClick()
        {
            EventManager.Instance.Dispatch(EventName.OPEN_TEST_VIEW1, false);
        }
    }
}